﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="HienthiKH.aspx.cs" Inherits="admin_HienthiKH" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <script type="text/javascript">
    function isconfirm() {
        var ck = confirm('Bạn có chắc xoá hay không?');
        if (ck == true)
            return true;
        else
            return false;
    }

        </script>


    <form id="form1" runat="server">
    <table style="width:100%;">
        <tr>
            <td>
            <table border="1" style="width: 600px; height: 223px" >
                <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" 
                    onitemcommand="Repeater1_ItemCommand">
                <HeaderTemplate>
                <tr>
                                <th align=center>Tên Khách Hàng</th>
							    <th align="left">Mật Khẩu</th>
							    <th align="left">Địa Chỉ</th>
							    <th align=center>Điện Thoại</th>
							    <th align="left">Email</th>				
                                <th align=center>Xoá</th>
                                 <th align="center">Sửa</th>			
                </tr>
                </HeaderTemplate>
                
                <ItemTemplate>
                <tr>
                            <td align=center><asp:HyperLink ID="hplTenKH" runat="server" NavigateUrl='<%# "~/ThemKH.aspx?tenkh=" + DataBinder.Eval(Container.DataItem,"tenkh")%>' Text='<%# DataBinder.Eval(Container.DataItem,"tenkh")%>' /></td>							
							<td align=center><%#Eval("matkhau")%></td>
							<td align=center><%#Eval("diachi")%></td>
							<td align=center><%#Eval("dienthoai")%></td>
							<td align=center><%#Eval("email")%></td>		
                            <td align=center><asp:ImageButton ID="imagebtxoa" runat="server" CommandArgument='dk' CommandName="Xoa" OnClientClick='return isconfirm()'
            ImageUrl="images/action_remove.png" /></td>
                             <td align="center">  <a align=left  href="Suakh.aspx?tenkh=<%#Eval("tenkh")%>"> <img src="images/action_check.png"  alt ="Check" id ="check" /></img></a></td>
                </tr>
                
                
                </ItemTemplate>
                
                
                
                
                
                </asp:Repeater>
                </table>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:maytinhxachtayConnectionString %>" 
                    SelectCommand="SELECT [TenKH], [MatKhau], [DiaChi], [DienThoai], [Email] FROM [KhachHang]">
                </asp:SqlDataSource>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <asp:Repeater ID="Repeater2" runat="server">
                </asp:Repeater>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        </table>
    </form>
</asp:Content>

